<!DOCTYPE html>
<html>


<!-- Mirrored from /theme/hplus/table_jqgrid.html by HTTrack Website Copier/3.x [XR&CO'2014], Wed, 20 Jan 2016 14:20:02 GMT -->
<head>

    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">


    <title>乡土味士-后台管理中心 - 活动中心</title>
    <meta name="keywords" content="H+后台主题,后台bootstrap框架,会员中心主题,后台HTML,响应式后台">
    <meta name="description" content="H+是一个完全响应式，基于Bootstrap3最新版本开发的扁平化主题，她采用了主流的左右两栏式布局，使用了Html5+CSS3等现代技术">

    <link rel="shortcut icon" href="favicon.ico">
    <link href="__PUBLIC__/css/bootstrap.min14ed.css?v=3.3.6" rel="stylesheet">
    <link href="__PUBLIC__/css/font-awesome.min93e3.css?v=4.4.0" rel="stylesheet">

    <!-- jqgrid-->
    <link href="__PUBLIC__/css/plugins/jqgrid/ui.jqgridffe4.css?0820" rel="stylesheet">

    <link href="__PUBLIC__/css/animate.min.css" rel="stylesheet">
    <link href="__PUBLIC__/css/style.min862f.css?v=4.1.0" rel="stylesheet">

    <style>
        /* Additional style to fix warning dialog position */

        #alertmod_table_list_2 {
            top: 900px !important;
        }
    </style>

</head>

<body class="gray-bg">
<div class="wrapper wrapper-content  animated fadeInRight">
    <div class="row">
        <div class="col-sm-12">
            <div class="ibox ">
                <div class="ibox-title">
                    <h5>乡土味士-活动商品管理</h5>
                </div>
                <div class="ibox-content">
                    <p>
                        对活动商品数据进行管理
                    </p>
                    <hr>
                    <h4><span class="glyphicon glyphicon-plus" aria-hidden="true" onclick="Save()">添加商品</span></h4>
                    <div class="jqGrid_wrapper">
                        <table id="table_list_1"></table>
                        <div id="pager_list_1" align="center">

                        </div>
                    </div>
                    <div class="footer">
                        {$page}
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>
<style type="text/css">
    .footer{
        text-align: center;
    }
    .footer a{
        width: 58px;
        height: 20px;
        display: inline-block;
        border: 1px solid #d2d2d2;
        margin-left: 2px;
    }
    .footer span{
        width: 58px;
        height: 20px;
        display: inline-block;
        margin-left: 2px;
    }
    .footer .current{
        background-color: #f4f4f4;
    }
    .footer .num{
    }
    .footer .prev{
    }
    .footer .next{
    }
</style>

<script src="__PUBLIC__/js/jquery.min.js?v=2.1.4"></script>
<script src="__PUBLIC__/js/bootstrap.min.js?v=3.3.6"></script>
<script src="__PUBLIC__/js/plugins/peity/jquery.peity.min.js"></script>
<script src="__PUBLIC__/js/plugins/jqgrid/i18n/grid.locale-cnffe4.js?0820"></script>
<script src="__PUBLIC__/js/plugins/jqgrid/jquery.jqGrid.minffe4.js?0820"></script>
<script src="__PUBLIC__/js/content.min.js?v=1.0.0"></script>
<script>
    $(document).ready(function () {
        $.jgrid.defaults.styleUI = "Bootstrap";
        var button = "<table class='ui-pg-table navtable ui-common-table'>" +
            "<tbody><tr>" +
            "<td class='ui-pg-button' title='编辑所选记录'><div class='ui-pg-div' onclick='update(this)'><span class='glyphicon glyphicon-edit'></span></div></td>" +
            "<td class='ui-pg-button' title='删除所选记录'><div class='ui-pg-div' onclick='unset(this)'><span class='glyphicon glyphicon-trash'></span></div></td>" +
            "</tr></tbody></table>";
        var mydata = [
            <volist name='list' id='vo'>
            {
                id:"{$vo.id}",
                category:"<?=getunit($vo['category'])?>",
                title:"{$vo.title}",
                username:"{$vo.username}",
                starttime:"{$vo['starttime']|date=\"Y-m-d H:i\",###}",
                endtime:"{$vo['endtime']|date=\"Y-m-d H:i\",###}",
                state:"{$vo.state}",
                button:button
            },
    </volist>
    ];
        $("#table_list_1").jqGrid({
            data: mydata,
            datatype: "local",
            height: "100%",
            autowidth: true,
            shrinkToFit: true,
            rowNum: 10,
            rowList: [10, 20, 30],
            colNames: ["序号","活动类型", "标题","发布人", "开始时间", "结束时间","状态",'操作'],
            colModel: [
                {name: "id", index: "id",width:"50",sorttype: "int"},
                {name: "category", index: "category",width:"50",align: "center",sorttype: "text"},
                {name: "title", index: "title",width:"200", align: "center",sorttype:"text"},
                {name: "username", index: "username",width:"100", align: "center",sorttype:"text"},
                {name: "starttime", index: "starttime",width:"100", align: "center",sorttype:"text"},
                {name: "endtime", index: "endtime",width:"100", align: "center",sorttype:"text"},
                {name: "state", index: "state",width:"50", align: "center",sorttype:"text"},
                {name: "button", index: "button",width:"50", align: "center"}
            ],
            pager: "#pager_list_1",
            viewrecords: false,
            caption: "活动管理",
            hidegrid: false

        });//end jqgrid

        $(window).bind("resize", function () {
            var width = $(".jqGrid_wrapper").width();
            $("#table_list_1").setGridWidth(width);
        })
    });//end fun
</script>
<script>
    function Save(){
        window.location.href="__MODULE__/Foretaste/addgroup";
    }//end fun
    function update(button){
        var goods_id = $(button).parent().parent().parent().parent().parent().parent().attr('id');
        window.location.href="__MODULE__/Foretaste/savegroup?id="+goods_id;
    }//end fun
    function unset(button){
        var goods_id = $(button).parent().parent().parent().parent().parent().parent().attr('id');
        window.location.href="__MODULE__/Foretaste/deletegroup?id="+goods_id;
    }//end fun
</script>
</body>
<!-- Mirrored from /theme/hplus/table_jqgrid.html by HTTrack Website Copier/3.x [XR&CO'2014], Wed, 20 Jan 2016 14:20:02 GMT -->
</html>
